{extend name="mainadmin@layouts/base" /}
{block name="main" }

<header class="header  b-b clearfix">
   <div class="page-breadcrumbs">
          <ul class="breadcrumb">
              <li>
                  <i class="fa fa-ellipsis-v"></i>
                  <strong>{$row['pay_id']>0?'编缉支付':'添加支付'}</strong>
              </li>                                  
          </ul>
          <a class="text-muted pull-right m-r-tm m-t-md pointer" data-toggle="back" title="返回"><i class="fa fa-reply"></i></a>
      </div>
</header>

<section class="scrollable  wrapper">
<form class="form-horizontal form-validate" method="post" action="{:url('info')}" style="padding:0;">
      <section class="panel panel-default">
        
          <div class="panel-body">  
                    <div class="form-group">
                             <label class="col-sm-2 control-label">支付名称：</label>
                             <div class="col-sm-10">
                               <span class="help-inline">{$row.pay_name}</span>
                            </div>
                      </div>

                     <div class="form-group">
                          <label class="col-sm-2 control-label">接口类名：</label>
                            <div class="col-sm-10">
                               <span class="help-inline">{$row.pay_code}</span>
                            </div>
                        </div>
                  		
                        {volist name="row.def_config" id="prow"}
                        <div class="form-group">
                             <label class="col-sm-2 control-label">{$prow['label']}：</label>
                             <div class="col-sm-10">
                               {if condition="$prow['type'] == 'file'"}
                              		<div class="controls " >
                                     <img class="thumb_img" name="imagefile" src="{$row['pay_config'][$prow['name']]}" style="max-height: 100px;" />
                                      <input class="hide" type="text" name="pay_config[{$prow['name']}]" value="{$row['pay_config'][$prow['name']]}" />
                                      <button class="btn btn-default" type="button" data-toggle="selectimg" data-config="selectimg">选择图片</button>
                                  </div>
                               {elseif condition="$prow['type'] == 'select'"/}
                               		<select name="pay_config[{$prow['name']}]">
                                    	{volist name="prow.option" id="val" key='k'}
                                        	<option value="{$index}" {$row['pay_config'][$prow['name']]==$index?'selected':''}>{$val}</option>
                                        {/volist}
                                    </select>
                               {elseif condition="$prow['type'] == 'textarea'"/}
                               		<textarea data-rule-required="true" name="pay_config[{$prow['name']}]"  style="width:80%; height:130px;">{$row['pay_config'][$prow['name']]}</textarea>
                               {else/}
                                	<input type="text" class="input-xlarge" data-rule-required="true" name="pay_config[{$prow['name']}]" value="{$row['pay_config'][$prow['name']]}"  />  		
                                    <span class="maroon">*</span>
                               {/if}
                             
                            </div>
                        </div>
                        {/volist}                
                   
                        <div class="form-group">
                            <label class="col-sm-2 control-label">排序（升序）：</label>
                             <div class="col-sm-10">
                              <input name="sort_order"  class="input-mini " value="0" type="text">
                              <span class="help-inline">数值越大排越前</span>
                            </div>
                        </div>
                        <div class="form-group">
                                 <label class="col-sm-2 control-label">是否启用：</label>
                                <div class="col-sm-10">
                                    <label class="radio-inline">
                                        <input name="status"  value="1"  {$row['status']==1?'checked':''} type="radio">启用
                                    </label>
                                    <label class="radio-inline" title="买家在下单时将无法使用此支付方式进行付款">
                                        <input name="status" value="0" {$row['status']==0?'checked':''} type="radio">不启用
                                    </label>
                                </div>
                          </div>
                          <div class="form-group">
                                 <label class="col-sm-2 control-label">用于充值：</label>
                                <div class="col-sm-10">
                                    <label class="radio-inline">
                                        <input name="is_recharge"  value="1"  {$row['is_recharge']==1?'checked':''} type="radio">是
                                    </label>
                                    <label class="radio-inline">
                                        <input name="is_recharge" value="0" {$row['is_recharge']==0?'checked':''} type="radio">不是
                                    </label>
                                </div>
                          </div>
                          <div class="line line-dashed line-lg pull-in"></div>
              <div class="form-group">
                  <div class="col-sm-4 col-sm-offset-2">
                      <button type="submit" class="btn btn-primary" data-loading-text="保存中...">保存</button>
                      <button type="button" class="btn btn-default" data-toggle="back">取消</button>
                  </div>
              </div>
          </div>

      </section>

	<input name="pay_id" type="hidden" value="{$row.pay_id|intval}">
</form>
</section>

   
{/block}
